package com.liming.user.controller;

import com.liming.common.pojo.dto.shop.ShopPageQuery;
import com.liming.common.pojo.vo.PageVO;
import com.liming.common.pojo.vo.shop.ShopVO;
import com.liming.common.result.LMResult;
import com.liming.shop.client.ShopClient;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liming
 * @date 2025/4/2
 */
@Slf4j
@RestController
@AllArgsConstructor
@Tag(name = "商店接口-Web")
@RequestMapping("/user/shop")
public class ShopController {

    private final ShopClient shopClient;

    @Operation(description = "分页 - 商店")
    @GetMapping
    public LMResult<PageVO<ShopVO>> list(ShopPageQuery shopPageQuery) {
        return LMResult.success(shopClient.page(shopPageQuery));
    }
}
